#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>

void *MY_Thread1(void *args);//线程1的函数入口

int main(int argc, char *argv[])
{
  int temp1,tmp2;
  void *retval;

  pthread_t thread1,thread2;

  temp1 = pthread_create(&thread1,NULL,MY_Thread1,NULL);
  if (temp1 != 0)
  {
    printf("creat thread failed\n");
  }
  else
  {
    printf("creat thread success\n");
  }
  
  while (1)
  {
    printf("Info:[loop][%s]\r\n",__func__);
    sleep(1);
  }
  
  
  return 0;
}

void *MY_Thread1(void *args)
{
  while (1)
  {
    printf("Info:[进入线程1函数][%s]\r\n",__func__);
    sleep(1);
  }
}